function EventPhotosCollection() {
	
	var _photos = [] ;
	
	var _coverPhoto;
		
	//Bindings	
	this.addPhoto = addPhoto;
	this.getPhotos = getPhotos;
	this.getIdByName = getIdByName;
	this.getPhotoEntityByName = getPhotoEntityByName;
	
	this.setCoverPhoto = setCoverPhoto;
	this.getCoverPhoto = getCoverPhoto;
	
	

	function addPhoto(aPhoto){
		_photos.push(aPhoto);	

	}
	
	function getPhotos(){
		return _photos;
	}
	
	function getCoverPhoto(){
		return _coverPhoto;
	}
	
	function setCoverPhoto(aCover){
		_coverPhoto = aCover;
	}
	
	function getIdByName(name){
		for (i=0; i<_photos.length; i++)
		{
		  var photo = _photos[i];
		  if (photo.getElementName()==name){
			  return photo.getId();
		  }
		}
		return undefined;
	}
	
	function getPhotoEntityByName(name){
		for (i=0; i<_photos.length; i++)
		{
		  var photo = _photos[i];
		  if (photo.getElementName()==name){
			  return photo;
		  }
		}
		return undefined;
	}
}